<?php require_once SYSTEM . '/HTMLHelper.php';?>
<!--begin congtent -->
<div class="content">
	<!--begin offer-left-->
	<div class="offer-left">
		<div id="request_menu_2" class="offer-left-caption" onclick="divMenuOnclick('request_menu','2');">
			<div style="float: left; padding-left: 5px;">
		    	<a href="#" style="font-size: 14px; color: #5b8aff; font-weight: bold; text-decoration: none;">Top Category</a>
		    </div>
		</div>
		
		<div id="request_menu_sub_2" class="offer-left-menu" style="display: block;">
			<?php foreach($this->ViewData['listCat'] as $cat) { ?>
		    	<div class="offer-left-menu-cell">
		        	<a style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;" href="/Offer/ListOffer?category=<?=$cat['_id']?>"><?php echo $cat['Name']; ?></a>
		        </div>            
		    <?php } ?>
		</div>

        <div id="request_menu_3" class="offer-left-caption" onclick="divMenuOnclick('request_menu','3');">
            <div style="float: left; padding-left: 5px;">
                <a href="#" style="font-size: 14px; color: #5b8aff; font-weight: bold; text-decoration: none;">Top Location</a>
            </div>
        </div>
        <div id="request_menu_sub_3" class="offer-left-menu" style="display: block;">
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div>   
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div> 
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div> 
        </div>
    </div>
    <!--end offer-left-->
    <!--begin offer-right-->
    <div class="offer-right">
        <!--begin offer-right-search-->
        <div class="offer-right-search">
            <form action="/Search/ListItem"  method="post">
                <div style="float: left; width: 750px;">
                    <div style="float: left; padding: 5px 10px;">
                        <input type="text" name="Content" style="width: 400px; height: 20px; border: 1px solid #abd6ff;" />
                    </div>
                    <div style="float: left; padding: 5px 10px;">
                        <select name="CategoryID" style="width: 100px; border: 1px solid #abd6ff; width: 100px">          
                            <option value="0" style="height: 20px;">Category</option>
                            <option value="4faa9b416803fa1b05000000" style="height: 20px;">Clothes</option>                                                                  
                        </select>
                    </div>
                    <div style="float: left; padding: 5px 10px;">
                        <select name="CityId" style="width: 100px; border: 1px solid #abd6ff; width: 100px">          
                            <option value="0" style="height: 20px;">Thanh Pho</option>
                            <option value="8237" style="height: 20px;">Lạng Sơn</option>                                                                  
                        </select>
                    </div>
                    <div style="float: left; padding: 5px 5px;">
                        <!--<input type="image" src="../Content/Image/migiv2/search.gif" />-->
                        <input type="submit" value="Search" name="submit" />
                    </div>
                </div>
                <div style="float: left; width: 750px;">
                    <div style="float: left; padding-left: 20px; width: 430px; margin-top: 5px;">
                        <a href="/map/RequestItem" style="color: #2078de; font-size: 12px;">Choose other country</a>
                    </div>
                    <div style="float: left; width: 270px; text-align: right; padding-right: 30px; padding-top: 5px;">
                        <a href="#" style="color: #2078de">Advance Search</a>
                    </div>
                </div>
                <input type="hidden" name="switch" value="<?=$this->ViewData['switch']?>"/>
            </form>
        </div>
        <!--end offer-right-search-->
        <div class="offer-right-caption" style="margin-top: 10px">
            <div style="float: left; padding-left: 10px; width: 480px; padding: 5px;">
                <label style="font-size: 14px; color: #5b8aff; font-weight: bold"> Result Search</label>
            </div>
        </div>
        <div class="offer-right-list-offer" style="min-height: 500px;">
            <div class="event-left" style="width: 99%">
                <?php foreach($this->Model['result'] as $model) { ?> 
                <div class="event-row" style="width: 99%;height: 120px;">
                    <div style="width: 100px; float: left;"> 
                        <?if($this->ViewData['switch'] == 1) {?>
                            <img style="border-style: none" width="100" height="100" alt="/" src="<?php echo 'http://www.themigi.com/Images/OfferImages/'.$model->Image;?>" />
                        <?}
                        else {?>
                            <img style="border-style: none" width="100" height="100" alt="/" src="<?php echo 'http://www.themigi.com/Images/RequestImages/'.$model->Image;?>" />
                        <?}?>
                    </div>
                    <div class="event-title" style="height: 45px;width: 620px;">
                        <div>
                            <a class="event-link" href="#"><?echo $model->Name;?></a>
                            <br>
                            <label><span style="color: #5b8aff">Location: </span><?echo $model->Location;?></label>&#32;&#32;&#32;
                            <label><span style="color: #5b8aff">Street: </span><?echo $model->Street;?></label><br />
                            
                            <label style="color: #848484;"><span style="color: #5b8aff">Create Date: </span><?echo $model->CreateDate;?></label>
                        </div>
                    </div>
                    <div class="event-description" style="height: 55px;width: 620px;">
                        <p style="padding: 0px; margin: 0px; overflow: hidden;"><?echo $model->Description;?></p>
                    </div>
                </div>
                <?}?>
                <div style="float: right; width: 450px;">
                    <div class='pager'>
                        <div class='paginator'>                        
                            <span class='previous'><?php echo $this->Model['paging']->previousPage; ?></span>
                            <span class='page'><?php echo $this->Model['paging']->pageLinks; ?></span>                        
                            <span class='next'><?php echo $this->Model['paging']->nextPage; ?></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="background-color: #5a8aff; height: 20px; width: 960px; float: left;"> </div>